#include <iostream>

using namespace std;

class Solution {
public:
    int hammingWeight(uint32_t n) {
        int count = 0;
        for (int i = 0; i < 32; i++) {
            int num = n & 0x00000001;
            if (num == 1) {
                count++;
            }
            n >>= 1;
        }
        return count;
    }
};

int main() {
    Solution solution;
    int output = solution.hammingWeight(0b00000000000000000000000000001011);
    cout << output << endl;
    return 0;
}